<!DOCTYPE html>
<html lang="en">
<head>
	{% capture title %}{% if page.title %}{{ page.title }} - {% elsif post.title %}{{ post.title }} - {% endif %}{% endcapture %}

	{% if title != '' %}
	<title>{{ title }}Leaflet</title>
	{% else %}
	<title>Leaflet - a JavaScript library for interactive maps</title>
	{% endif %}
	
	<meta charset="utf-8" />
	{% if title == '' %}
	<meta property="og:title" content="Leaflet — an open-source JavaScript library for interactive maps" />
	<meta property="og:description" content="Leaflet is a modern, lightweight open-source JavaScript library for building powerful interactive maps." />
	<meta property="og:image" content="{{ root }}docs/images/logo.png" />
	<meta property="og:image:alt" content="Leaflet">
	<meta itemprop="name" content="Leaflet">
	<meta itemprop="description" content="Leaflet — a modern, lightweight open-source JavaScript library for building powerful interactive maps.">
	<meta itemprop="image" content="{{ root }}docs/images/logo.png">
	{% endif %}

	{% if page.redirect_to %}
	<link rel="canonical" href="{{ page.redirect_to }}"/>
	<meta http-equiv="refresh" content="0;url={{ page.redirect_to }}" />
	{% endif %}

	<meta name="viewport" content="width=device-width, initial-scale=1.0">

	{% capture root %}{% if page.root %}{{ page.root }}{% else %}{{ layout.root }}{% endif %}{% endcapture %}

	<link rel="shortcut icon" type="image/x-icon" href="{{ root }}docs/images/favicon.ico" />

	<link href="https://leafletjs.com/atom.xml" type="application/atom+xml" rel="alternate" title="Leaflet Dev Blog Atom Feed" />

	<link rel="stylesheet" href="{{ root }}docs/css/normalize.css" />
	<link rel="stylesheet" href="{{ root }}docs/css/main.css" />
	{% if page.title == 'Documentation' %}
	<link rel="stylesheet" href="{{ root }}docs/css/reference.css" />
	{% endif %}

	<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,300' rel='stylesheet' type='text/css'>

	<script src="{{ root }}docs/highlight/highlight.pack.js"></script>
	<link rel="stylesheet" href="{{ root }}docs/highlight/styles/github-gist.css" />

	<!-- Leaflet -->
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@{{ site.latest_leaflet_version}}/dist/leaflet.css" integrity="{{site.integrity_hash_css}}" crossorigin=""/>
	<script type="importmap">
		{
			"imports": {
				"leaflet": "https://cdn.jsdelivr.net/npm/leaflet@{{ site.latest_leaflet_version}}/dist/leaflet.js"
			},
			"integrity": {
				"https://cdn.jsdelivr.net/npm/leaflet@{{ site.latest_leaflet_version}}/dist/leaflet.js": "{{site.integrity_hash_uglified}}"
			}
		}
	</script>
	{% if page.css %}<style>{{ page.css }}</style>{% endif %}

	<script>
		ACCESS_TOKEN = 'pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw';
		MB_ATTR = 'Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, ' +
			'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>';
		MB_URL = 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=' + ACCESS_TOKEN;
		OSM_URL = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
		OSM_ATTRIB = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
	</script>
</head>
<body{% if page.bodyclass %} class="{{ page.bodyclass }}"{% endif %}>

<header>
	<h1><a href="https://leafletjs.com/"><img src="{{ root }}docs/images/logo.png" alt="Leaflet" width="300" /></a></h1>
	<p class="tagline">an open-source JavaScript library<br> for building powerful interactive maps</p>
</header>

<nav>
	<ul class="nav">
		<li>
			{% if page.title == nil %}
				<span>Overview</span>
			{% else %}
				<a href="{{ root }}index.html">Overview</a>
			{% endif %}
		</li>
		<li>
			{% if page.title == 'Tutorials' %}
				<span>Tutorials</span>
			{% else %}
				<a href="{{ root }}examples.html"{% if page.tutorial == true %} class="active"{% endif %}>Tutorials</a>
			{% endif %}
		</li>
		<li>
			{% if page.title == 'Documentation' %}
				<span>Docs</span>
			{% else %}
				<a href="{{ root }}reference.html">Docs</a>
			{% endif %}
		</li>
		<li>
			{% if page.title == 'Download' %}
				<span>Download</span>
			{% else %}
				<a href="{{ root }}download.html">Download</a>
			{% endif %}
		</li>
		<li>
			{% if page.title == 'Plugins' %}
				<span>Plugins</span>
			{% else %}
				<a href="{{ root }}plugins.html">Plugins</a>
			{% endif %}
		</li>
		<li>
			{% if page.title == 'Blog' %}
				<span>Blog</span>
			{% else %}
				<a href="{{ root }}blog.html"{% if page.post == true %} class="active"{% endif %}>Blog</a>
			{% endif %}
		</li>
	</ul>
</nav>

<main>
	<div class="container">
		{{ content }}
	</div>
</main>

<footer class="container">
	<div class="footer">
		<p>&copy; 2010–{{ 'now' | date: "%Y" }} <a href="https://agafonkin.com">Volodymyr Agafonkin</a>. Maps &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.</p>
	</div>

	<nav class="ext-links">
	  <a class="ext-link twitter" href="https://twitter.com/LeafletJS" title="Follow LeafletJS on X"><img alt="Follow LeafletJS on X" src="{{root}}docs/images/x-round.svg" width="46" /></a>
	  <a class="ext-link github" href="http://github.com/Leaflet/Leaflet" title="View Source on GitHub"><img alt="View Source on GitHub" src="{{root}}docs/images/github-round.svg" width="46" /></a>
	  <a class="ext-link forum" href="https://stackoverflow.com/questions/tagged/leaflet" title="Ask for help on Stack Overflow"><img alt="Leaflet questions on Stack Overflow" src="{{root}}docs/images/forum-round.svg" width="46" /></a>
	</nav>

	<button id="back-to-top" title="Scroll back to top">
		<svg viewBox="0 0 16 16">
			<path d="M7.3,3.3c0.4-0.4,1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4s-1,0.4-1.4,0L8,5.4l-5.3,5.3c-0.4,0.4-1,0.4-1.4,0s-0.4-1,0-1.4L7.3,3.3L7.3,3.3z"/>
		</svg>
	</button>
</footer>

<script>
	var _gaq = _gaq || [];
	_gaq.push([ '_setAccount', 'UA-4147697-4' ]);
	_gaq.push([ '_trackPageview' ]);

	(function() {
		var ga = document.createElement('script');
		ga.type = 'text/javascript';
		ga.async = true;
		ga.src = ('https:' == document.location.protocol ? 'https://ssl'
				: 'http://www')
				+ '.google-analytics.com/ga.js';
		var s = document.getElementsByTagName('script')[0];
		s.parentNode.insertBefore(ga, s);
	})();
</script>

<script src="{{ root }}dialog/dialog.js"></script>
<script src="{{ root }}docs/js/docs.js"></script>
{% if page.title == 'Documentation' %}
<script src="{{ root }}docs/js/reference.js"></script>
{% endif %}
</body>
</html>
